﻿Imports CapaLogica.CL.Foro
Imports CapaLogica.CL.Tema

Module Seguridad

 

    Public Function validarSiEsDuenioForo(ByRef idUsario As Integer, ByRef idForo As Integer) As Boolean
        Try
            Return GestorForo.validarSiEsDuenioForo(idUsario, idForo)
        Catch ex As Exception

        End Try


    End Function

    Public Function validarSiTemaEsDeUnUsuario(ByRef idTema As Integer) As Boolean
        Try
            Dim tema As Dictionary(Of String, Object) = GestorTema.consultarTema(idTema)

            Return CType(tema("esDuenio"), Boolean)

        Catch ex As Exception

        End Try

    End Function

    Public Sub redirigirPorError(ByVal errorMessage As String, ByVal httpReponse As HttpResponse)
        httpReponse.Redirect("ErrorPage.aspx?ErrorMessage= " & errorMessage)
    End Sub


End Module
